﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyOA.DAL;
using MyOA.Model;

namespace MyOA.BLL
{
    public class LoginManage
    {
        LoginService service = new LoginService();

        /// <summary>
        /// 查看用户是否登陆
        /// </summary>
        /// <param name="loginUser">输入的用户信息</param>
        /// <returns>返回是否是存在的用户</returns>
        public bool isLoginSuccessed(UserInfo loginUser)
        {
            return service.isLoginSuccessed(loginUser);
        }
        /// <summary>
        /// 增加登陆日志的信息
        /// </summary>
        /// <param name="loginLog">要增加的登陆日志信息</param>
        public void insertLoginLog(LoginLog loginLog)
        {
            service.insertLoginLog(loginLog);
        }

        /// <summary>
        /// 根据登陆名找登陆ID
        /// </summary>
        /// <param name="loginId"></param>
        /// <returns></returns>
        public int getUserIdByLoginId(string loginId)
        {
            return service.getUserIdByLoginId(loginId);
        }
    }
}
